package com.daka.service.impl;

import com.daka.dao.ProjectDao;
import com.daka.entity.Project;
import com.daka.service.ProjectService;
import com.daka.service.TeamService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author beliveli on 2016/3/31 0031.
 */
@Service("projectService")
@SuppressWarnings("unused")
public class ProjectServiceImpl implements ProjectService {

    @Resource
    private ProjectDao projectDao;

    @Override
    public Project findById(Long id) {
        return projectDao.selectByPrimaryKey(id);
    }

    public Project findByTeamId(Long id){
        return projectDao.selectByTeamId(id);
    }

    @Override
    public int updateById(Project project) {
        return projectDao.updateByPrimaryKeySelective(project);
    }

    @Override
    public List<Project> findByUserIdGroup(Long id) {
        return projectDao.findByUserIdGroup(id);
    }

}
